using UnityEngine;
using System.Collections;

public class HostClientGUI : MonoBehaviour 
{
	public HostOrClient HoC;
	
	private Vector2 ButtonSize = new Vector2(200,300);
	
	private Vector2 HostButtonPos;
	private Vector2 ClientButtonPos;
	
	void Start()
	{
		HostButtonPos = new Vector2((Screen.width/2.0f)-(ButtonSize.x+10.0f),(Screen.height/2.0f)-(ButtonSize.y/2.0f));
		ClientButtonPos = new Vector2((Screen.width/2.0f)+10.0f,(Screen.height/2.0f)-(ButtonSize.y/2.0f));
	}
	
	void OnGUI ()
	{
		if (GUI.Button (new Rect (HostButtonPos.x, HostButtonPos.y, ButtonSize.x , ButtonSize.y), "HOST"))
		{
			HoC.Host = true;
			Application.LoadLevel("Game");
		}
		
		if(GUI.Button (new Rect (ClientButtonPos.x,ClientButtonPos.y,ButtonSize.x,ButtonSize.y), "CLIENT"))
		{
			HoC.Host = false;
			Application.LoadLevel("Game");
		}
	}
}
